<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<title>myRIO Project</title>
<style>

<!--

/***************************************************/

/* MINIMAL STYLES */

/* The following section defines styles that every HTML Help project should need. */



/* Specifies White Background color */

body {background-color:#FFFFFF; font-family:Verdana, sans-serif; font-size:8pt; color: #000000;}



/* The default style of P is red to alert you that you need to apply a style class, such as Body. */

P { margin-top:6.00pt; margin-bottom:6.00pt;}



BR { font-size:4.00pt; }



/* Use H1 for all topic headings. */

H1 { margin-top:3.00pt; margin-bottom:3.00pt; font-size:150%; font-weight:bold;  }



/* Use H2 for second-level headings. */

H2 { margin-top:9.00pt; margin-bottom:3.00pt; font-size:125%; font-weight:bold;  }



/* Use H3 for third-level headings. */

H3 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold;  }



/* Use H4 for fourth-level headings. */

H4 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold;  }



/* H5 and H6 have the same definition as H4 because you should not need this level of heading in one topic. If you need to use H5 or H6, consider breaking up your topic into more than one topic. */

H5 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold;  }

H6 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold;  }



/* Use the Body style class for normal paragraphs. */

P.Body {  }



/* Use the Anchor style class for graphic references on a line by themselves. */

P.Anchor { font-size:125%;  }



/* Use the Indent style classes to indent a paragraph. If you need to indent text below a list item, use <br><br> to start the new paragraph within the same set of <li></li> tags. If you need to indent a list within another list, nest the indented list within the first list's set of <ol></ol> or <ul></ul> tags. */

P.Indent1 { margin-left:12.00pt; margin-bottom:3.00pt;  }

P.Indent2 { margin-left:24.00pt; margin-bottom:3.00pt;  }

P.Indent3 { margin-left:36.00pt; margin-bottom:3.00pt;  }

P.Indent4 { margin-left:48.00pt; margin-bottom:3.00pt;  }

P.Indent5 { margin-left:60.00pt; margin-bottom:3.00pt;  }



/* Use the LI style for all list items. */

LI { margin-top:3.00pt; margin-bottom:3.00pt; }



/* Use the OL style for numbered lists. You do not have to type the number for each list item in a numbered list. */

OL { margin-left:22.00pt; margin-top:3.00pt; margin-bottom:3.00pt; text-indent:0pt; list-style-type: decimal; }



/* Use the OL style for numbered lists. Nested lists will use the bullet types according to the nesting scheme below */

ol ol {list-style-type:lower-alpha}

ol ol ol {list-style-type:decimal}

ol ol ol ol {list-style-type:lower-alpha}

ol ol ol ol ol {list-style-type:decimal}

ol ol ol ol ol ol {list-style-type:lower-alpha}

ol ol ol ol ol ol ol {list-style-type:decimal}

ol ol ol ol ol ol ol ol {list-style-type:lower-alpha}





/* Use the EquationNum style class for numbered lists of equations. You do not have to type the number for each list item in a numbered list. */

OL.EquationNum { margin-left:36.00pt; text-indent:0pt; list-style-type: decimal; }



/* Use the List-abc style class for lettered lists. You do not have to type the letter for each list item in a lettered list. */

OL.List-abc { margin-left:22.00pt; text-indent:0pt; list-style-type:lower-alpha; }



/* Use the UL style for bulleted lists. You do not have to type the bullet for each list item in a bulleted list. */

UL { margin-left:22.00pt; text-indent:0pt; margin-top:3.00pt; margin-bottom:3.00pt; list-style-type: disc; }



/* Use the UL style for bulleted lists. Nested lists will use the bullet types according to the nesting scheme below. */

ul ul {list-style-image: none;list-style-type: circle}

ul ul ul {list-style-image:none;list-style-type:disc}

ul ul ul ul {list-style-image: none;list-style-type: circle}

ul ul ul ul ul {list-style-image:none;list-style-type:disc}

ul ul ul ul ul ul {list-style-image: none;list-style-type: circle}

ul ul ul ul ul ul ul {list-style-image:none;list-style-type:disc}

ul ul ul ul ul ul ul ul ul{list-style-image: none;list-style-type: circle}



/* Use the List-Box style class for bulleted lists with boxes instead of bullets. You do not have to type the box for each list item in a box list. */

UL.List-Box { list-style-image: none;list-style-type: square}



Table { font-size:100%; }



/* Use the Borderless style class for tables that do not need borders, such as for 2-column or 3-column lists with no headings. */

Table.Borderless { border:none; }



/* Use the Bordered style class for tables that need borders. */

Table.Bordered { border-width: 1pt; border-style: solid; border-color: #000000; border-collapse: collapse; }



/* Use the TD style for table cells in Borderless or Borderless-Wide tables. */

TD { vertical-align:top; padding:3px; }



/* Use the Bordered style class for table headings and cells in Bordered or Bordered-Wide tables. */

.Bordered { border-width: 1pt; border-style: solid; border-color: #000000; }



/* Use the Icon style class for table cells that contain note, caution, warning, or tip icons, or LabVIEW datatype terminals. */

TD.Icon { width:40px; }



/* Use the TH style for table heading cells in Borderless or Borderless-Wide tables. */

TH { font-weight:bold; padding:3px; }



/* Use the Left-Align style class for table headings and cells that you want to left align instead of center align. */

.Left-Align { text-align:left; }



/***************************************************/

/* CHARACTER FORMATS */

/* The following section defines character formats that every HTML Help project should need. */



/* CHARACTER FORMATS Updated to conform with the CSE HTML Validator Pro */

/* The following section defines character formats that every HTML Help project should need. */



/* Use the Dark-Red format for warnings or cautions. */

.Dark-Red { color: #800000 }



/* Use the Monospace format for code or syntax examples. */

.Monospace { font-family: Courier New; font-size: 100%; }



/* Use the Monospace-Bold format for messages and responses that the computer automatically prints to the screen. */

.Monospace-Bold { font-family: Courier New; font-weight: bold; font-size: 100%; }



/* Use the Monospace-Italic format to denote text that is a placeholder for a word or value that the user must supply. */

.Monospace-Italic { font-family: Courier New; font-style: italic; font-size: 100%; }



/* small class */

.smallFont { font-size:87.5%; }



/* Bold class */

.Bold { font-weight: bold; }



/* Italic class */

.Italic { font-style: italic; }



/* Use the Platform format to denote a specific platform. */

.Platform { color: #0000FF; font-weight: bold; }



/* Use the Symbol format for characters not in the Verdana character set. Use this format sparingly. When possible, you should use the correct ASCII code for the symbol or use a graphic to recreate the symbol. */

.Symbol { font-family: Symbol; }



/* Use the Red-text format to call attention to text that needs  information added or edited by techcomm */

.Red-text {color: #FF0000;}



/* Use the Green-Underline format for the green defintion in the conventions topic */

.Green-Underline {color: #007700; text-decoration : underline;}



/* Use the glossButton format for the glossary buttons used in the glossary topic */

.glossButton { font-size:12px; color:black; }



/* Use for text sections and hyphenated words that should not break at line wraps */

.nobreak{white-space:nowrap}



/* Use for template instructions. */

.instructions{color:red; font-style:italic}



/*Use for words and text sections that do not need to be localized */

.DNL { }



/* The following styles define the color of links. */

a:link { color: #007700 }

a:visited { color: #7F007F }

a:link:hover { color: #FF0000 }

a:link:active { color: #FF0000 }



/***************************************************

** Forms */



form { margin-top:0pt; margin-bottom:3pt; color:black; }

select { font-size:100%; color:black; }



/*******************************************************

** Margins **

** Use these styles for block-level elements inside tables cells or list items where you do not want extra padding at the top or bottom of a cell. */

.noTopMargin { margin-top:0pt;}

.noBottomMargin { margin-bottom:0pt;}



/***************************************************

** CODE STYLES **

** The following section defines styles that you need to format entire sections of code or syntax examples. If you have just a few words you need to format as a code or syntax example, use the Monospace character format. */



P.Code { margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New;  }

P.Code1 { margin-left:12.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New;  }

P.Code2 { margin-left:24.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New;  }

P.Code3 { margin-left:36.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family:Courier New;  }

-->
</style>
<script type="text/javascript"> // define hyperlinks and function for launching a URL in a browser

var L_flat_sequences = "http://digital.ni.com/express.nsf/bycode/exxnii2013";
var L_shift_registers = "http://digital.ni.com/express.nsf/bycode/exar5k2013";
var L_wait_functions = "http://digital.ni.com/express.nsf/bycode/exc7mg";
var L_while_loops = "http://digital.ni.com/express.nsf/bycode/ext9fg2013";
var L_waveform_charts = "http://digital.ni.com/express.nsf/bycode/exmgc6";
var L_sequence_structures = "http://digital.ni.com/express.nsf/bycode/exh5a6";

function WWW(url) 
	{
	var urlWindow;
	urlWindow = window.open(url, "New", "directories=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes");
	}
</script>

</HEAD>
<body>

<h1>myRIO Project</h1>

<p class="Body">The myRIO Project template provides a starting point for creating NI myRIO applications. The design of this template makes it easy to access NI myRIO I/O channels and onboard devices without making major modifications to the structure of the application.</p>

<h2>Examples</h2>
<p class="Body">Refer to the myRIO sample projects, available from the <strong>Create Project</strong> dialog box, for examples of adapting this template to more complex applications.</p>

<h2>System Requirements</h2>
<h3>Development System</h3>
<ul>
<li>LabVIEW Full or Professional Development System</li>
<li>LabVIEW for myRIO Module</li>
<li>LabVIEW Real-Time Module</li>
</ul>
<h3>Hardware</h3>
<ul>
<li>NI myRIO</li>
</ul>

<h2>Overview</h2>
<img src="myRIO_Project_Diagram.gif">
<p class="Body">This template uses a Flat Sequence structure that executes the following three frames from left to right:</p>
<ol>
<li><strong>Initialize</strong>&#8212;Initializes the application. Use this frame to initialize user interface elements like controls and indicators, variables, and the NI myRIO hardware. Initialization is not required for every application.</li>
<li><strong>Acquire and process data</strong>&#8212;Acquires data from the NI myRIO and processes the data for presentation. The While Loop repeats the code until you click <strong>Stop</strong> or an error occurs.</li>
<li><strong>Close</strong>&#8212;Cleans up user interface elements and variables, and resets the hardware output values to zero before the application exits. Closing code is optional.</li>
</ol>

<h2>Running This Template</h2>
<ol>
	<li>In the <strong>Project Explorer</strong> window, open <span class="Monospace">Main.vi</span>.</li>
	<li>Click <strong>Run</strong>. This application continuously acquires instantaneous data from the accelerometer on the NI myRIO and displays the acceleration values on a waveform chart.</li>
	<li>Rotate or shake the NI myRIO to see the changes of the acceleration values.</li>
	<li>Click <strong>Stop</strong> to stop the application.</li>
</ol>

<h2>Modifying This Template</h2>
<h3>Determining Your Needs</h3>
<p class="Body">Before you customize this template for your own application, ask yourself the following questions:</p>
<ul>
<li><strong>What kind of I/O channel will this application need to access?</strong> The answer to this question determines the myRIO VIs you need to use.</li>
<li><strong>What kind of data will this application need to access?</strong> The answer to this question determines what data you initialize in the <strong>Initialize</strong> frame.</li>
<li><strong>What are some errors that could occur, and how should the application respond to these errors?</strong> The answers to these questions determine the amount of <a href="#error_handling">error handling you need</a>.</li>
</ul>

<h3>Controlling the Order of Execution</h3>
<p class="Body">This template uses the Flat Sequence structure to execute frames from left to right when all data values wired to a frame are available. The data leaves each frame as the frame finishes executing. <a href="javascript:WWW(L_sequence_structures)">Use sequence structures sparingly</a> when you modify this template. Rely on data dependency or flow-through parameters to control the order of execution.</p>

<h3>Adding Initialization Code</h3>
<p class="Body">In the <strong>Initialize</strong> frame, add code that initializes your application. For example, you may want to initialize the data to specific values, open a file for logging, and so on.</p>

<h3>Modifying the Data Acquisition and Processing Code</h3>
<p class="Body">By default, this template uses the Accelerometer Express VI to acquire acceleration data from the onboard accelerometer and displays the acceleration values on a waveform chart. You can add your own code to acquire data from the NI myRIO and process the data based on your application needs. The LabVIEW for myRIO Module provides Express VIs and advanced I/O VIs for you to access I/O channels and the onboard devices.</p>

<h3>Adding Closing Code</h3>
<p class="Body">In the <strong>Close</strong> frame, add code that executes after the data acquisition and processing is complete but before the application exits. Closing code commonly accomplishes the following tasks:</p>
<ul>
<li>Frees memory by closing any open references</li>
<li>Flushes any buffers in use</li>
<li>Resets the NI myRIO hardware</li>
</ul>
<table class="Borderless">
<tr>
<td class="Icon"><img src="noloc_note.gif" alt="Note"></td>
<td><strong>Note</strong>&nbsp;&nbsp;The use of the Reset myRIO VI must be after the completion of all operations with the NI myRIO I/O channels. Otherwise, the Reset myRIO VI might return unexpected results.</td>
</tr>
</table>

<a name="error_handling"></a><h3>Modifying Error Handling</h3>
<p class="Body">By default, this template stops if the Accelerometer Express VI returns an error or when you click the <strong>Stop</strong> button. When you customize this template, you can use the <strong>error in</strong> and <strong>error out</strong> clusters in each VI you use to pass the error information through the VI. If you want to ignore errors, you can remove the OR Function and wire the <strong>Stop</strong> button directly to the conditional terminal of the While Loop.</p>

<h2>LabVIEW Features and Concepts Used</h2>

<ul>
	<li><a href="javascript:WWW(L_flat_sequences)">Flat Sequence Structures</a></li>
	<li><a href="javascript:WWW(L_shift_registers)">Shift Registers</a></li>
	<li><a href="javascript:WWW(L_wait_functions)">Wait Functions</a></li>
	<li><a href="javascript:WWW(L_waveform_charts)">Waveform Charts</a></li>
	<li><a href="javascript:WWW(L_while_loops)">While Loops</a></li>
</ul>

<hr>
<h2>Important Information</h2>
<!--Copyright-->
<p class="Body"><strong>Copyright</strong></p>
<p class="Body">&#0169; 2013 National Instruments. All rights reserved.</p>

<p class="Body">Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.</p>

<p class="Body">National Instruments respects the intellectual property of others, and we ask our users to do the same.  NI software is protected by copyright and other intellectual property laws.  Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.</p>

<p class="Body"><strong>End-User License Agreements and Third-Party Legal Notices</strong></p>
<p class="Body">You can find end-user license agreements (EULAs) and third-party legal notices in the following locations after installation:</p>
<ul>
<li>Notices are located in the <span class="Monospace">&lt;National Instruments&gt;\_Legal Information</span> and <span class="Monospace">&lt;National Instruments&gt;</span> directories.</li> 
<li>EULAs are located in the <span class="Monospace">&lt;National Instruments&gt;\Shared\MDF\Legal\license</span> directory.</li>
<li>Review <span class="Monospace">&lt;National Instruments&gt;\_Legal Information.txt</span> for information on including legal information in installers built with NI products.</li>
</ul>

<!--Trademarks-->
<p class="Body"><strong>Trademarks</strong></p>

<p class="Body">Refer to the <em><span class="DNL">NI Trademarks and Logo Guidelines</span></em> at <a href="http://digital.ni.com/express.nsf/bycode/rdtrad" target="_blank"><span class="DNL">ni.com/trademarks</span></a> for information on <span class="DNL">National Instruments</span> trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies.</p>

<!--Patents-->
<p class="Body"><strong>Patents</strong></p>
<p class="Body">For patents covering the National Instruments products/technology, refer to the appropriate location: <strong>Help&#0187;Patents</strong> in your software, the <span class="Monospace">patents.txt</span> file on your media, or the <em>National Instruments Patent Notice</em> at <a href="http://digital.ni.com/express.nsf/bycode/rdlv17" target="_blank">ni.com/patents</a>.</p>

</body>
</html>